package com.yxh.sse.dao;

import java.util.List;


import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import com.yxh.sse.po.SysUserInfor;

@org.springframework.transaction.annotation.Transactional
public class UserInfoDaoImpl extends HibernateDaoSupport implements UserInfoDao {

	@Override
	public List login(String username, String password) {
		String sql = "from SysUserInfor where username='" + username
				+ "' and password='" + password + "'";
		List list = getHibernateTemplate().find(sql);
		
		return list;
	}

	@Override
	public void saveUserInfo(SysUserInfor sys) {
		getHibernateTemplate().saveOrUpdate(sys);
	}

	@Override
	public List<SysUserInfor> reviewUserAll() {
		return getHibernateTemplate().find("from SysUserInfor");
	}
	
	

}
